package design.forkjoin;

import java.util.concurrent.Callable;
import java.util.concurrent.ThreadLocalRandom;

public class Callable6 implements Callable {
    private String name;

    public Callable6(String name) {
        this.name = name;
    }

    @Override
    public Object call() throws Exception {
        int sleep = ThreadLocalRandom.current().nextInt(3000);
        System.out.println("sleep = " + sleep);
        Thread.sleep(sleep);
        return this.name;
    }
}
